package com.yang.pojo;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import javax.persistence.*;
import java.util.Date;

/**
 * The persistent class for the user_info database table.
 *
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@Table(name = "tb_user_info")
public class UserInfo implements Serializable {
	/***
	 * 员工信息
	 */

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id")
	private Integer id;

	@Column(name = "username")
	private String username;

	@Column(name = "password")
	private String password;

	@Column(name = "phone_number")
	private String phoneNumber;

	@Column(name = "roleId")
	private Integer roleId;

	@Transient
	private Role role;

	@Column(name = "department_id")
	private Integer departmentId;

	@Column(name = "work_type")
	private Integer workType;

	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "leave_time")
	private Date leaveTime;

	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "insert_time")
	private Date insertTime;

	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "update_time")
	private Date updateTime;

	@Column(name = "is_end")
	private Integer isEnd;

}